<div class="ui stackable grid">
<div class="three wide column" >

</div>

<div class="ten wide column">

  <form class="ui form" #projForm="ngForm">
    <div class="field" [class.error]="!projName.valid">
      <label>项目名称</label>
      <input placeholder="name" type="text" [(ngModel)]="proj.title" #projName="ngForm" ngControl="projName" maxlength="100" required>
    </div>
    <div class="field" [class.error]="!desc.valid">
      <label>项目描述</label>
      <textarea rows="3" [(ngModel)]="proj.description" #desc="ngForm" ngControl="desc" maxlength="500"></textarea>
    </div>
    <div class="fields">
    <!--
    <div class="field">
      <label>可见性</label>
      <div class="ui buttons">
        <button class="ui button" [class.active]="proj.open" (click)="setOutgiving(true)">公开</button>
        <button class="ui button" [class.active]="!proj.open" (click)="setOutgiving(false)">私有</button>
      </div>
    </div>
    -->
    </div>

    <div class="field">
      <button class="ui button green" (click)="submit()" [disabled]="!projForm.form.valid">Submit</button>
      <button class="ui circular google plus icon button" (click)="delete()" *ngIf="proj._id">
        <i class="trash icon"></i>
      </button>
    </div>
</form>
</div>

</div>


<div class="ui basic modal">
  <i class="close icon"></i>
  <div class="header">
    删除文档
  </div>
  <div class="image content">
    <div class="image">
      <i class="trash outline icon"></i>
    </div>
    <div class="description">
      <p>删除文档之后无法恢复！！！</p>
    </div>
  </div>
  <div class="actions">
    <div class="two fluid ui inverted buttons">
      <div class="ui red basic inverted button" (click)="cancelDelete()">
        <i class="remove icon"></i>
        No
      </div>
      <div class="ui green basic inverted button" (click)="confirmDelete()">
        <i class="checkmark icon"></i>
        Yes
      </div>
    </div>
  </div>
</div>
